<?php
class admin_core_Users_Adapter extends Engine_Adapter
{
	/**
	 * @param  $password
	 * @param null $id
	 * @return bool
	 */
	public function passwordValid($password, $id = null)
	{
		$command = $this->getCommand('admin_core_Users::Command_PasswordValid', array(
			'password' => $password,
			'id' => !empty($id) ? $id : admin_core_Auth::getInstance()->getId()
		));

		//var_dump($command->toString());die;
				
		$result = $command->fetchOne('passwordValid');

		return $result;
	}
}